package com.game.gameshoppingcenter.dao;

import com.game.gameshoppingcenter.entities.Games;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GamesRepository extends CrudRepository<Games,Long> {

    @Query(nativeQuery = true,value = "select * from games where games_id='1'")
    List<Games> findByGamesId();
    @Query(nativeQuery = true,value = "select * from games where games_id='2'")
    List<Games> findByGamesId1();
    @Query(nativeQuery = true,value = "select * from games where games_id='3'")
    List<Games> findByGamesId2();
    @Query(nativeQuery = true,value = "select * from games where games_id='4'")
    List<Games> findByGamesId3();
    @Query(nativeQuery = true,value = "select * from games where games_id='5'")
    List<Games> findByGamesId4();
 @Query(nativeQuery = true,value = "select * from games where games_id='6'")
List<Games> findByGamesId5();
}
